home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9075 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.0 KB

  1. Path: mozo.cc.purdue.edu!not-for-mail
  2. From: hrubin@b.stat.purdue.edu (Herman Rubin)
  3. Newsgroups: comp.arch.arithmetic,comp.lang.c,comp.lang.c++,comp.lang.misc
  4. Subject: Languages and architecture  Was: Re: Access carry flag from C
  5. Date: 28 Feb 1996 08:46:51 -0500
  6. Organization: Purdue University Statistics Department
  7. Message-ID: <4h1mcb$178u@b.stat.purdue.edu>
  8. References: <Dn1C9z.DGv.0.net@indra.com> <3132f352.32867731@netline-fddi.jpl.nasa.gov>
  9. NNTP-Posting-Host: b.stat.purdue.edu
  10.  
  11. In article <3132f352.32867731@netline-fddi.jpl.nasa.gov>,
  12. Kevin Quitt <kdq@emoryi.jpl.nasa.gov> wrote:
  13. >On Mon, 19 Feb 1996 18:20:22 GMT, sullivan@indra.com (Steve Sullivan) wrote:
  14.  
  15. >>Is it possible to determine if a fixed point overflow has
  16. >>occurred from within C?
  17.  
  18. >No, it's not, because as far as C is concerned, there doesn't have to be a
  19. >carry bit.  Once overflow has occurred, you're into undefined behaviour.
  20.  
  21. This is a problem with C and just about every other language, which 
  22. impacts adversely the architecture of machines.
  23.  
  24. The language designers typically remove much of what a knowledgeable
  25. user will want to use from the language, because their own knowledge
  26. is lacking in that area.  Then the designers of the arithmetic units
  27. of the machines drop that property, because the languages do not 
  28. have it.  
  29.  
  30. And now we have computers on which many cheap instructions and 
  31. properties are not present.  We cannot detect overflow, so we
  32. are forced to either use many times the number of instructions,
  33. or find some other clumsy way areound the problem.  We cannot
  34. do decent precise fixed point arithmetic, so the time for 
  35. multiple precision arithmetic, fixed or floating, is increased
  36. by a substantial factor.  Even the floating point unit has been
  37. restricted so that, for example, doubling the machine precision
  38. is a major undertaking.
  39.  
  40. We can always simulate any computer on any other.  Hardware 
  41. deficiencies are not handled efficiently by software.
  42.  
  43. -- 
  44. Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
  45. hrubin@stat.purdue.edu     Phone: (317)494-6054    FAX: (317)494-0558
  46.